<template>
  <div @click="handleClick" ref="divRef">
    {{message}}
  </div>
</template>
<script setup>

import { nextTick, ref } from 'vue'

const message = ref('123')
const divRef = ref()

const handleClick = async () => {
  message.value = '456'
  console.log(divRef.value)
  console.log('html',divRef.value.innerHTML)
  //
  // nextTick(()=>{
  //   console.log('html',divRef.value.innerHTML)
  //
  // })
  /*nextTick().then(() => {
    console.log('html',divRef.value.innerHTML)
  })*/
  await nextTick()
  console.log('html',divRef.value.innerHTML)
}
</script>

<style scoped>

</style>
